<template>
  <el-card>
    <div class="btns" style="padding:1em;margin-bottom:1em;background:#fff">
      <el-button type="primary" icon="el-icon-plus" size="small" @click="add">新增</el-button>
      <el-button style="margin-right: 6px" type="primary" size="small" :loading="downloadLoading" @click="handleDownload">导出</el-button>
      <el-input v-model="form.proName" placeholder="请输入项目名"></el-input>
      <el-input v-model="form.name" placeholder="请输入设备名"></el-input>
      <el-input v-model="form.brand" placeholder="请输入品牌"></el-input>
      <el-input v-model="form.model" placeholder="请输入型号"></el-input>
      <el-button style="margin-right: 6px" type="primary" icon="el-icon-search" size="small" @click="toSearch">查询</el-button>
    </div>

    <base-table
      :columns="table.columns"
      v-model="table.dataSource"
      :selectedRowKeys="selectedRowKeys"
      @change="selectedRowKeysChange"
      :pagination="iPagination"
      :tableChange="handleTableChange"
    >
      <template slot="action" slot-scope="r">
        <a-button size="small" type="danger">删除</a-button>
      </template>
    </base-table>

  </el-card>
</template>

<script>
  import { CommonMixins } from "@/mixins/CommonMixins";
  import FormBox from '@/components/Page/FormBox'
  import FormItem from '@/components/Page/FormItem'
  import BaseDialog from '@/components/Page/BaseDialog'
  import BaseTable from '@/components/Page/BaseTable'
  import { getAction, postActionByJson, postActionByQueryString } from '@/api/manage'


  export default {
    mixins: [CommonMixins],
    components: {
      FormBox,
      FormItem,
      BaseDialog,
      BaseTable
    },
    created() {

    },
    data() {
      return {
        url: {

        },
        form: {},
        table: {
          columns: [
            {
              key: 'id',
              title: 'id'
            },
            {
              key: 'name',
              title: 'name'
            },
            {
              key: 'model',
              title: 'model'
            },
            {
              key: 'params',
              title: 'params'
            },
            {
              key: 'action',
              title: '操作'
            },
          ],
          dataSource: [
            {
              id: 1,
              name: 'hahha',
              model: 'jajj',
              params: 'jajj',
            },
            {
              id: 2,
              name: 'hahha',
              model: 'jajj',
              params: 'jajj',
            },
          ],

        }
      }
    },
    methods: {
      selectedRowKeysChange(val) {
        this.selectedRowKeys = val
      },
      toSearch(){

      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
